package com.xhh.nphm.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xhh.nphm.system.domain.MWorkcsbase;
import com.xhh.nphm.system.domain.MmailWorkForm;
import com.xhh.nphm.system.domain.TworkFormBaseEty;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
* @author Administrator
* @description 针对表【MWorkcsbase(电话工单抄送件表)】的数据库操作Mapper
* @createDate 2022-07-21 16:14:27
* @Entity com.xhh.nphm.system.domain.MWorkcsbase
*/
@Mapper
public interface MWorkcsbaseDao extends BaseMapper<MWorkcsbase> {
    /**
     * 查询电话工单抄送件列表数据
     *
     * @param mmailWorkForm 查询条件
     * @param deptId           部门编号
     * @return 列表数据
     */
    @Select("select m1.pkId,m1.BringTime,OriginFK,WorkFormNO,SpareString,FromTopic,FmAreaName,FromName,FromTel,DCntAName,FromTime,OpenX,WfLimit,CrtStepName " +
            "from mMailWorkForm as m1,mWorkcsbase as m2 where m1.PkId = m2.WfId and m2.IsDel = 0 and m1.IsDel = 0 and m2.deptId = #{deptId} " +
            "[[and workFormNo = #{mwf.workFormNo}]] " +
            "[[and wsCode = #{mwf.wsCode}]] "+
            "[[and fromName =#{mwf.fromName}]]" +
            "[[and fmContent =#{mwf.fmContent}]]" +
            "[[and fromTelA =#{mwf.fromTel}]]"+
            "order by PkId desc")
    List<MmailWorkForm> mailCopyList(@Param("mwf") MmailWorkForm mmailWorkForm, @Param("deptId") Long deptId);
}




